﻿@model IEnumerable<WebUI.Models.QizSubject>
@{
    ViewBag.Title = "随访单管理";
}
@{ var tm = Model.FirstOrDefault(); tm = tm != null ? tm : new WebUI.Models.QizSubject();}
<div id="ListView">
    @Html.Partial("SearchPartial", new ViewDataDictionary
{ 
    { "SearchAction", "SFDList" },
    { "UpdateTargetId", "ListView" },
    {"NewLinkTitle", "新建随访单-测试"},
    {"NewLinkAction", "SFDEdit"},
    {"NewLinkArg", null},
    {"DialogTitle", "随访单"}
})
    <table class="width container" cellpadding="0" cellspacing="0">
        <tr>
            <td width="300px" valign="top">
                <table class="width" cellpadding="0" cellspacing="0">
                    <tr>
                        <th>
                            @Html.LabelFor(model => tm.ID)
                        </th>
                        <th>
                            @Html.LabelFor(model => tm.Title)
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    @foreach (var item in Model.OrderByDescending(v => v.SortIdx))
                    {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.ID)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.Title)
                            </td>
                            <td>
                                @Html.ActionLink("查看", "QizSessionEdit", new { SubjectID = item.ID, PreviewOnly = true, _newpage = "true" }, new { Target = "_blank" })
                                @Ajax.ActionLink("明细", "SftMingXiList", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                            </td>
                        </tr>
                    }
                </table>
            </td>
            <td valign="top">
                <div id="SftMingXiView">
                    @Html.Action("SftMingXiList", new { ID = ViewBag.QizSubjectID })
                </div>
            </td>
        </tr>
    </table>
</div>
